<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:p="http://primefaces.org/ui">


<p:dialog id="dialogCadastro" modal="true" width="50%" closable="false" position="top"
	widgetVar="dialogCadastroTipo" header="Cadastro Tipo de Exame" appendTo="@(body)" resizable="true" draggable="true">
	<p:ajax event="close" listener="#{tipoExameMB.close}" update="frmDialogTipo" />
	<h:form id="frmDialogTipo">
		<h:panelGrid columns="2">

			<p:outputLabel value="Codigo:"></p:outputLabel>
			<p:inputText value="#{tipoExameMB.tipoExameSelecionado.codigo}"
				disabled="true"></p:inputText>

			<p:outputLabel value="Descrição:" for="iptdesc"></p:outputLabel>
			<p:inputText id="iptdesc" onfocus="iptdesc"
				value="#{tipoExameMB.tipoExameSelecionado.descricao}" size="40"
				disabled="#{tipoExameMB.consultando}" required="true"
				requiredMessage="Descrição é obrigatória!" maxlength="50"></p:inputText>


		</h:panelGrid>
		<h:panelGrid columns="2" style="border:0px">
			<p:commandButton value="Confirma"
				actionListener="#{tipoExameMB.salvar}" 
				rendered="#{not tipoExameMB.consultando}" update="frmDialogTipo,:frmTab:tabela,:mensagem"
				oncomplete="validaDialog(args,'dialogCadastroTipo', 'frmDialogTipoAnimal:dialogCadastro')" />


			<p:commandButton value="Cancela" id="btnFechar" onclick="dialogCadastroTipo.hide()" immediate="true"/>

		</h:panelGrid>

	</h:form>
</p:dialog>

</html>